using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace NeuroSpeech.Imap
{
	public class ImapRequestMessageHeader : UIDImapRequest<ImapResponseMessageHeader>
	{
		public ulong? FromId { get; set; }
		public ulong? ToId { get; set; }
		public ulong? Id { get; set; }

		#region public override string  ToString()
		public override string ToString()
		{
			if (Id != null)
			{
				return string.Format("fetch {0} (RFC822.SIZE ENVELOPE BODYSTRUCTURE UID INTERNALDATE)", Id);
			}
			string from = FromId == null ? "*" : FromId.Value.ToString();
			string to = ToId == null ? "*" : ToId.Value.ToString();
			return string.Format("fetch {0}:{1} (RFC822.SIZE ENVELOPE BODYSTRUCTURE UID INTERNALDATE)", 
				from,
				to);
		}
		#endregion


	}
}
